package org.timeticker.impl;

import org.apache.log4j.Logger;
import org.timeticker.Activity;
import org.timeticker.DailyActivityList;
import org.timeticker.Day;
import org.timeticker.ObjectList;

/**
 * Activity list.<br/>
 * <i><strong>Note :</strong> Implementation is thread safe</i>
 *
 * @author Ivan Latysh
 * @version 0.1
 * @since 16-Jul-2007 : 7:37:26 PM
 */
public class DailyActivityListImpl extends AbstractObjectList<Activity> implements DailyActivityList {
  // Error prefix ACL00001

  /** logger */
  protected Logger logger = Logger.getLogger(this.getClass().getName());
  /** No activity list */
  public static final ObjectList<Activity> noActivities = new DailyActivityListImpl();
  /** From Date */
  protected Day day;

  /**
   * Return date
   *
   * @return date
   */
  public Day getDay() {
    return day;
  }

  /**
   * Set date
   *
   * @param day date
   */
  public void setDay(Day day) {
    this.day = day;
  }

  /**
   * Update modified flag
   *
   * @param modified modified flag
   */
  public void setModified(boolean modified) {
    this.modified = modified;
  }

  /** {@inheritDoc} */
  public boolean add(Activity activity) {
    return super.add(activity);
  }

  /** {@inheritDoc} */
  public boolean remove(Activity activity) {
    return super.remove(activity);
  }

  /** {@inheritDoc} */
  public int size() {
    return super.size();
  }

  /** {@inheritDoc} */
  public Activity get(int index) {
    return super.get(index);
  }

  /**
   * Always return null
   *
   * @param key object key
   * @return object
   */
  public Activity get(String key) {
    return null;
  }

}
